package jiuxing

type Msg1A struct {
	Tm           []byte
	Nu           string
	Balance      int
	AllowCharge  byte
	RefuseReason byte
	BillMode     byte
	BillModeRate BillMode
}

func (msg *Msg1A) Encode() []byte {
	ret := make([]byte, 0)
	ret = append(ret, msg.Tm...)
	ret = append(ret, String2ByteWithlen(msg.Nu, 16)...)
	ret = append(ret, IntLittleToBytes(msg.Balance)...)
	ret = append(ret, msg.AllowCharge)
	ret = append(ret, msg.RefuseReason)
	ret = append(ret, msg.BillMode)

	return ret
}
